.class public Lcom/nemustech/tiffany/world/TFPanel;
.super Lcom/nemustech/tiffany/world/TFModel;
.source "TFPanel.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/nemustech/tiffany/world/TFPanel$OnPanelMorphListener;,
        Lcom/nemustech/tiffany/world/TFPanel$Morpher;
    }
.end annotation


# static fields
.field static final TAG:Ljava/lang/String; = "TFPanel"


# instance fields
.field protected mColorBuffer:Ljava/nio/FloatBuffer;

.field protected mImageOrientation:[I

.field private mMorphAnchorX:F

.field private mMorphAnchorY:F

.field private mMorphTargetHeight:F

.field private mMorphTargetWidth:F

.field private mMorpher:Lcom/nemustech/tiffany/world/TFPanel$Morpher;

.field private mOnPanelMorphListener:Lcom/nemustech/tiffany/world/TFPanel$OnPanelMorphListener;

.field protected mReverseWay:[I


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    const/high16 v0, 0x3f80

    .line 24
    invoke-direct {p0}, Lcom/nemustech/tiffany/world/TFModel;-><init>()V

    .line 25
    invoke-direct {p0, v0, v0}, Lcom/nemustech/tiffany/world/TFPanel;->create(FF)V

    .line 26
    return-void
.end method

.method public constructor <init>(FF)V
    .locals 0
    .parameter "width"
    .parameter "height"

    .prologue
    .line 33
    invoke-direct {p0}, Lcom/nemustech/tiffany/world/TFModel;-><init>()V

    .line 34
    invoke-direct {p0, p1, p2}, Lcom/nemustech/tiffany/world/TFPanel;->create(FF)V

    .line 35
    return-void
.end method

.method public constructor <init>(Lcom/nemustech/tiffany/world/TFHolder;FF)V
    .locals 0
    .parameter "holder"
    .parameter "width"
    .parameter "height"

    .prologue
    .line 56
    invoke-direct {p0}, Lcom/nemustech/tiffany/world/TFModel;-><init>()V

    .line 57
    invoke-direct {p0, p2, p3}, Lcom/nemustech/tiffany/world/TFPanel;->create(FF)V

    .line 58
    invoke-super {p0, p1}, Lcom/nemustech/tiffany/world/TFModel;->attachTo(Lcom/nemustech/tiffany/world/TFHolder;)V

    .line 59
    return-void
.end method

.method public constructor <init>(Lcom/nemustech/tiffany/world/TFWorld;FF)V
    .locals 0
    .parameter "world"
    .parameter "width"
    .parameter "height"

    .prologue
    .line 44
    invoke-direct {p0}, Lcom/nemustech/tiffany/world/TFModel;-><init>()V

    .line 45
    invoke-direct {p0, p2, p3}, Lcom/nemustech/tiffany/world/TFPanel;->create(FF)V

    .line 46
    invoke-super {p0, p1}, Lcom/nemustech/tiffany/world/TFModel;->attachTo(Lcom/nemustech/tiffany/world/TFWorld;)V

    .line 47
    return-void
.end method

.method static synthetic access$000(Lcom/nemustech/tiffany/world/TFPanel;)F
    .locals 1
    .parameter "x0"

    .prologue
    .line 18
    iget v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphAnchorX:F

    return v0
.end method

.method static synthetic access$100(Lcom/nemustech/tiffany/world/TFPanel;)F
    .locals 1
    .parameter "x0"

    .prologue
    .line 18
    iget v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphAnchorY:F

    return v0
.end method

.method static synthetic access$200(Lcom/nemustech/tiffany/world/TFPanel;)Lcom/nemustech/tiffany/world/TFPanel$OnPanelMorphListener;
    .locals 1
    .parameter "x0"

    .prologue
    .line 18
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mOnPanelMorphListener:Lcom/nemustech/tiffany/world/TFPanel$OnPanelMorphListener;

    return-object v0
.end method

.method private create(FF)V
    .locals 8
    .parameter "width"
    .parameter "height"

    .prologue
    const/16 v7, 0x10

    const/4 v6, 0x2

    const/4 v5, 0x0

    .line 158
    new-array v3, v7, [F

    fill-array-data v3, :array_0

    .line 163
    .local v3, texCoords:[F
    array-length v4, v3

    mul-int/lit8 v4, v4, 0x4

    invoke-static {v4}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;

    move-result-object v2

    .line 164
    .local v2, tbb:Ljava/nio/ByteBuffer;
    invoke-static {}, Ljava/nio/ByteOrder;->nativeOrder()Ljava/nio/ByteOrder;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;

    .line 165
    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->asFloatBuffer()Ljava/nio/FloatBuffer;

    move-result-object v4

    iput-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    .line 166
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v4, v3}, Ljava/nio/FloatBuffer;->put([F)Ljava/nio/FloatBuffer;

    .line 167
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v4, v5}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 169
    invoke-virtual {p0, p1, p2}, Lcom/nemustech/tiffany/world/TFPanel;->setSize(FF)V

    .line 170
    new-array v4, v6, [I

    iput-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mImageOrientation:[I

    .line 171
    new-array v4, v6, [I

    iput-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mReverseWay:[I

    .line 172
    const/4 v4, 0x1

    invoke-super {p0, v4}, Lcom/nemustech/tiffany/world/TFModel;->setBackFaceVisibility(Z)V

    .line 175
    new-array v1, v7, [F

    fill-array-data v1, :array_1

    .line 182
    .local v1, colorBuffer:[F
    array-length v4, v1

    mul-int/lit8 v4, v4, 0x4

    invoke-static {v4}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;

    move-result-object v0

    .line 183
    .local v0, cbb:Ljava/nio/ByteBuffer;
    invoke-static {}, Ljava/nio/ByteOrder;->nativeOrder()Ljava/nio/ByteOrder;

    move-result-object v4

    invoke-virtual {v0, v4}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;

    .line 184
    invoke-virtual {v0}, Ljava/nio/ByteBuffer;->asFloatBuffer()Ljava/nio/FloatBuffer;

    move-result-object v4

    iput-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    .line 185
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v4, v1}, Ljava/nio/FloatBuffer;->put([F)Ljava/nio/FloatBuffer;

    .line 186
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v4, v5}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 187
    return-void

    .line 158
    :array_0
    .array-data 0x4
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
    .end array-data

    .line 175
    :array_1
    .array-data 0x4
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x80t 0x3ft
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
        0x0t 0x0t 0x0t 0x0t
    .end array-data
.end method


# virtual methods
.method protected adjustTextureCoordination(Landroid/graphics/Rect;III)V
    .locals 9
    .parameter "rectTexture"
    .parameter "index"
    .parameter "textureWidth"
    .parameter "textureHeight"

    .prologue
    const/16 v8, 0x8

    .line 283
    mul-int/lit8 v4, p2, 0x8

    .line 284
    .local v4, offset:I
    const/4 v1, 0x0

    .line 285
    .local v1, newLeft:F
    const/4 v3, 0x0

    .line 287
    .local v3, newTop:F
    iget v6, p1, Landroid/graphics/Rect;->right:I

    int-to-float v6, v6

    int-to-float v7, p3

    div-float v2, v6, v7

    .line 288
    .local v2, newRight:F
    iget v6, p1, Landroid/graphics/Rect;->bottom:I

    int-to-float v6, v6

    int-to-float v7, p4

    div-float v0, v6, v7

    .line 290
    .local v0, newBottom:F
    const/16 v6, 0x10

    new-array v5, v6, [F

    const/4 v6, 0x0

    aput v1, v5, v6

    const/4 v6, 0x1

    aput v0, v5, v6

    const/4 v6, 0x2

    aput v2, v5, v6

    const/4 v6, 0x3

    aput v0, v5, v6

    const/4 v6, 0x4

    aput v1, v5, v6

    const/4 v6, 0x5

    aput v3, v5, v6

    const/4 v6, 0x6

    aput v2, v5, v6

    const/4 v6, 0x7

    aput v3, v5, v6

    aput v2, v5, v8

    const/16 v6, 0x9

    aput v0, v5, v6

    const/16 v6, 0xa

    aput v1, v5, v6

    const/16 v6, 0xb

    aput v0, v5, v6

    const/16 v6, 0xc

    aput v2, v5, v6

    const/16 v6, 0xd

    aput v3, v5, v6

    const/16 v6, 0xe

    aput v1, v5, v6

    const/16 v6, 0xf

    aput v3, v5, v6

    .line 301
    .local v5, texCoords:[F
    iget-object v6, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v6, v4}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 302
    iget-object v6, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v6, v5, v4, v8}, Ljava/nio/FloatBuffer;->put([FII)Ljava/nio/FloatBuffer;

    .line 303
    iget-object v6, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v6}, Ljava/nio/FloatBuffer;->rewind()Ljava/nio/Buffer;

    .line 305
    iget-object v6, p0, Lcom/nemustech/tiffany/world/TFPanel;->mImageOrientation:[I

    aget v6, v6, p2

    invoke-virtual {p0, p2, v6}, Lcom/nemustech/tiffany/world/TFPanel;->setImageDirection(II)V

    .line 306
    iget-object v6, p0, Lcom/nemustech/tiffany/world/TFPanel;->mReverseWay:[I

    aget v6, v6, p2

    invoke-virtual {p0, p2, v6}, Lcom/nemustech/tiffany/world/TFPanel;->reverseImage(II)V

    .line 307
    return-void
.end method

.method protected applyMorph(I)V
    .locals 13
    .parameter "tickPassed"

    .prologue
    const/4 v12, 0x2

    const/4 v11, 0x1

    const/4 v10, 0x0

    const-wide/16 v8, 0x0

    .line 62
    iget-wide v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    cmp-long v4, v4, v8

    if-lez v4, :cond_1

    .line 64
    iget-wide v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    iget-wide v6, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphInitialTime:J

    cmp-long v4, v4, v6

    if-nez v4, :cond_2

    .line 66
    iput-wide v8, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphInitialTime:J

    .line 90
    :cond_0
    :goto_0
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    invoke-static {}, Lcom/nemustech/tiffany/world/TFWorld;->requestRender()V

    .line 92
    :cond_1
    return-void

    .line 71
    :cond_2
    iget-wide v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    int-to-long v6, p1

    sub-long/2addr v4, v6

    cmp-long v4, v4, v8

    if-gez v4, :cond_3

    .line 72
    iget-wide v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    long-to-int p1, v4

    .line 74
    :cond_3
    int-to-float v4, p1

    iget-wide v5, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    long-to-float v5, v5

    div-float v2, v4, v5

    .line 75
    .local v2, ratio:F
    new-array v1, v12, [F

    .line 77
    .local v1, newSize:[F
    iget v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphTargetWidth:F

    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFPanel;->getWidth()F

    move-result v5

    sub-float/2addr v4, v5

    mul-float v3, v4, v2

    .line 78
    .local v3, widthDiff:F
    iget v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphTargetHeight:F

    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFPanel;->getHeight()F

    move-result v5

    sub-float/2addr v4, v5

    mul-float v0, v4, v2

    .line 79
    .local v0, heightDiff:F
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFPanel;->getWidth()F

    move-result v4

    add-float/2addr v4, v3

    aput v4, v1, v10

    .line 80
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFPanel;->getHeight()F

    move-result v4

    add-float/2addr v4, v0

    aput v4, v1, v11

    .line 81
    iget-wide v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    int-to-long v6, p1

    sub-long/2addr v4, v6

    iput-wide v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    .line 83
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mOnPanelMorphListener:Lcom/nemustech/tiffany/world/TFPanel$OnPanelMorphListener;

    if-eqz v4, :cond_4

    .line 84
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorpher:Lcom/nemustech/tiffany/world/TFPanel$Morpher;

    aget v5, v1, v10

    aget v6, v1, v11

    invoke-virtual {v4, v5, v6, v3, v0}, Lcom/nemustech/tiffany/world/TFPanel$Morpher;->setParams(FFFF)V

    .line 85
    :cond_4
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorpher:Lcom/nemustech/tiffany/world/TFPanel$Morpher;

    invoke-static {v4}, Lcom/nemustech/tiffany/world/TFWorld;->queueEvent(Ljava/lang/Runnable;)V

    .line 87
    invoke-virtual {p0}, Lcom/nemustech/tiffany/world/TFPanel;->isInEffectAnimation()Z

    move-result v4

    if-nez v4, :cond_0

    .line 88
    iput v12, p0, Lcom/nemustech/tiffany/world/TFModel;->mEffectStatus:I

    goto :goto_0
.end method

.method public morph(FFFFJ)V
    .locals 3
    .parameter "width"
    .parameter "height"
    .parameter "anchorPositionX"
    .parameter "anchorPositionY"
    .parameter "animationTime"

    .prologue
    const/high16 v2, 0x3f00

    const/high16 v1, -0x4100

    .line 128
    cmpg-float v0, p3, v1

    if-ltz v0, :cond_0

    cmpg-float v0, v2, p3

    if-gez v0, :cond_1

    :cond_0
    const/4 p3, 0x0

    .line 129
    :cond_1
    cmpg-float v0, p4, v1

    if-ltz v0, :cond_2

    cmpg-float v0, v2, p4

    if-gez v0, :cond_3

    :cond_2
    const/4 p4, 0x0

    .line 131
    :cond_3
    iput-wide p5, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphInitialTime:J

    .line 132
    iput-wide p5, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphRemainingTime:J

    .line 133
    iput p1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphTargetWidth:F

    .line 134
    iput p2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphTargetHeight:F

    .line 135
    iput p3, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphAnchorX:F

    .line 136
    iput p4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorphAnchorY:F

    .line 137
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    invoke-static {}, Lcom/nemustech/tiffany/world/TFWorld;->requestRender()V

    .line 138
    :cond_4
    return-void
.end method

.method public morph(FFJ)V
    .locals 7
    .parameter "width"
    .parameter "height"
    .parameter "animationTime"

    .prologue
    const/4 v3, 0x0

    .line 124
    move-object v0, p0

    move v1, p1

    move v2, p2

    move v4, v3

    move-wide v5, p3

    invoke-virtual/range {v0 .. v6}, Lcom/nemustech/tiffany/world/TFPanel;->morph(FFFFJ)V

    .line 125
    return-void
.end method

.method protected onBeforeDraw(Ljavax/microedition/khronos/opengles/GL10;I)Z
    .locals 1
    .parameter "gl"
    .parameter "tickPassed"

    .prologue
    .line 366
    invoke-virtual {p0, p2}, Lcom/nemustech/tiffany/world/TFPanel;->applyMorph(I)V

    .line 367
    const/4 v0, 0x1

    return v0
.end method

.method protected onSetOpacity(Ljavax/microedition/khronos/opengles/GL10;FZ)V
    .locals 6
    .parameter "gl"
    .parameter "opacity"
    .parameter "reflection"

    .prologue
    .line 372
    if-eqz p3, :cond_3

    iget-boolean v2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mBeautyReflection:Z

    if-eqz v2, :cond_3

    .line 373
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mWorld:Lcom/nemustech/tiffany/world/TFWorld;

    iget v2, v2, Lcom/nemustech/tiffany/world/TFWorld;->mReflectionOpacity:F

    mul-float v1, p2, v2

    .line 374
    .local v1, reflectionOpacity:F
    const v2, 0x8076

    invoke-interface {p1, v2}, Ljavax/microedition/khronos/opengles/GL10;->glEnableClientState(I)V

    .line 375
    const/4 v0, 0x0

    .local v0, j:I
    :goto_0
    const/16 v2, 0x8

    if-ge v0, v2, :cond_2

    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    const/4 v3, 0x3

    if-eq v0, v3, :cond_0

    const/4 v3, 0x7

    if-ne v0, v3, :cond_1

    :cond_0
    const/high16 v3, 0x3f80

    :goto_1
    invoke-virtual {v2, v0, v3}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_1
    move v3, v1

    goto :goto_1

    .line 376
    :cond_2
    const/4 v2, 0x4

    const/16 v3, 0x1406

    const/4 v4, 0x0

    iget-object v5, p0, Lcom/nemustech/tiffany/world/TFPanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    invoke-interface {p1, v2, v3, v4, v5}, Ljavax/microedition/khronos/opengles/GL10;->glColorPointer(IIILjava/nio/Buffer;)V

    .line 379
    .end local v0           #j:I
    .end local v1           #reflectionOpacity:F
    :goto_2
    return-void

    .line 378
    :cond_3
    invoke-super {p0, p1, p2, p3}, Lcom/nemustech/tiffany/world/TFModel;->onSetOpacity(Ljavax/microedition/khronos/opengles/GL10;FZ)V

    goto :goto_2
.end method

.method public reverseImage(II)V
    .locals 7
    .parameter "index"
    .parameter "reverseWay"

    .prologue
    const/4 v6, 0x3

    .line 255
    mul-int/lit8 v0, p1, 0x8

    .line 256
    .local v0, offset:I
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mReverseWay:[I

    aput p2, v2, p1

    .line 258
    const/4 v2, 0x1

    if-eq p2, v2, :cond_0

    if-ne p2, v6, :cond_1

    .line 260
    :cond_0
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x2

    invoke-virtual {v2, v3}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v1

    .line 261
    .local v1, temp:F
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x2

    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v5, v0, 0x0

    invoke-virtual {v4, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v4

    invoke-virtual {v2, v3, v4}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 262
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x0

    invoke-virtual {v2, v3, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 264
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x6

    invoke-virtual {v2, v3}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v1

    .line 265
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x6

    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v5, v0, 0x4

    invoke-virtual {v4, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v4

    invoke-virtual {v2, v3, v4}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 266
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x4

    invoke-virtual {v2, v3, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 269
    .end local v1           #temp:F
    :cond_1
    const/4 v2, 0x2

    if-eq p2, v2, :cond_2

    if-ne p2, v6, :cond_3

    .line 271
    :cond_2
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x1

    invoke-virtual {v2, v3}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v1

    .line 272
    .restart local v1       #temp:F
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x1

    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v5, v0, 0x5

    invoke-virtual {v4, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v4

    invoke-virtual {v2, v3, v4}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 273
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x3

    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v5, v0, 0x7

    invoke-virtual {v4, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v4

    invoke-virtual {v2, v3, v4}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 275
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x5

    invoke-virtual {v2, v3, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 276
    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v3, v0, 0x7

    invoke-virtual {v2, v3, v1}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 278
    .end local v1           #temp:F
    :cond_3
    return-void
.end method

.method public setBackgroundImage(ILcom/nemustech/tiffany/world/TFTextureInfo;)V
    .locals 2
    .parameter "faceIndex"
    .parameter "textureInfo"

    .prologue
    .line 310
    const/4 v1, 0x0

    invoke-virtual {p2, v1}, Lcom/nemustech/tiffany/world/TFTextureInfo;->getLayer(I)Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;

    move-result-object v0

    .line 311
    .local v0, layerInfo:Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;
    iget-boolean v1, v0, Lcom/nemustech/tiffany/world/TFTextureInfo$TFTextureLayer;->bTexturized:Z

    if-eqz v1, :cond_0

    .line 312
    invoke-virtual {p0, p1}, Lcom/nemustech/tiffany/world/TFPanel;->getTextureInfo(I)Lcom/nemustech/tiffany/world/TFTextureInfo;

    .line 314
    :cond_0
    return-void
.end method

.method public setColorBuffer([F)V
    .locals 3
    .parameter "colorBuffer"

    .prologue
    .line 360
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    array-length v1, p1

    if-ge v0, v1, :cond_0

    .line 361
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mColorBuffer:Ljava/nio/FloatBuffer;

    aget v2, p1, v0

    invoke-virtual {v1, v0, v2}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 360
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 362
    :cond_0
    return-void
.end method

.method public setImageDirection(II)V
    .locals 10
    .parameter "index"
    .parameter "direction"

    .prologue
    const/4 v9, 0x4

    const/4 v8, 0x3

    const/4 v7, 0x2

    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 199
    mul-int/lit8 v2, p1, 0x8

    .line 200
    .local v2, offset:I
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFPanel;->mImageOrientation:[I

    aput p2, v3, p1

    .line 202
    const/16 v3, 0x8

    invoke-static {v3}, Ljava/nio/FloatBuffer;->allocate(I)Ljava/nio/FloatBuffer;

    move-result-object v0

    .line 203
    .local v0, copy:Ljava/nio/FloatBuffer;
    const/4 v1, 0x0

    .local v1, i:I
    :goto_0
    const/16 v3, 0x8

    if-ge v1, v3, :cond_0

    .line 204
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int v4, v2, v1

    invoke-virtual {v3, v4}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v3

    invoke-virtual {v0, v1, v3}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 203
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 207
    :cond_0
    packed-switch p2, :pswitch_data_0

    .line 240
    :goto_1
    return-void

    .line 210
    :pswitch_0
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x2

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 211
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x3

    invoke-virtual {v0, v6}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 212
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x6

    invoke-virtual {v0, v7}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 213
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x7

    invoke-virtual {v0, v8}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 214
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x0

    invoke-virtual {v0, v9}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 215
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x1

    const/4 v5, 0x5

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 216
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x4

    const/4 v5, 0x6

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 217
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x5

    const/4 v5, 0x7

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    goto :goto_1

    .line 220
    :pswitch_1
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x4

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 221
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x5

    invoke-virtual {v0, v6}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 222
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x0

    invoke-virtual {v0, v7}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 223
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x1

    invoke-virtual {v0, v8}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 224
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x6

    invoke-virtual {v0, v9}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 225
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x7

    const/4 v5, 0x5

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 226
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x2

    const/4 v5, 0x6

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 227
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x3

    const/4 v5, 0x7

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    goto/16 :goto_1

    .line 230
    :pswitch_2
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x6

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 231
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x7

    invoke-virtual {v0, v6}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 232
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x4

    invoke-virtual {v0, v7}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 233
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x5

    invoke-virtual {v0, v8}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 234
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x2

    invoke-virtual {v0, v9}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 235
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x3

    const/4 v5, 0x5

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 236
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x0

    const/4 v5, 0x6

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    .line 237
    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFModel;->mTextureBuffer:Ljava/nio/FloatBuffer;

    add-int/lit8 v4, v2, 0x1

    const/4 v5, 0x7

    invoke-virtual {v0, v5}, Ljava/nio/FloatBuffer;->get(I)F

    move-result v5

    invoke-virtual {v3, v4, v5}, Ljava/nio/FloatBuffer;->put(IF)Ljava/nio/FloatBuffer;

    goto/16 :goto_1

    .line 207
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method public setOnPanelMorphListener(Lcom/nemustech/tiffany/world/TFPanel$OnPanelMorphListener;)V
    .locals 1
    .parameter "listener"

    .prologue
    .line 151
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorpher:Lcom/nemustech/tiffany/world/TFPanel$Morpher;

    if-nez v0, :cond_0

    .line 152
    new-instance v0, Lcom/nemustech/tiffany/world/TFPanel$Morpher;

    invoke-direct {v0, p0}, Lcom/nemustech/tiffany/world/TFPanel$Morpher;-><init>(Lcom/nemustech/tiffany/world/TFPanel;)V

    iput-object v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMorpher:Lcom/nemustech/tiffany/world/TFPanel$Morpher;

    .line 153
    :cond_0
    iput-object p1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mOnPanelMorphListener:Lcom/nemustech/tiffany/world/TFPanel$OnPanelMorphListener;

    .line 154
    return-void
.end method

.method public setSize(FF)V
    .locals 10
    .parameter "width"
    .parameter "height"

    .prologue
    const/4 v9, 0x0

    const/high16 v8, 0x4000

    const/4 v7, 0x0

    .line 323
    cmpg-float v4, p1, v7

    if-lez v4, :cond_0

    cmpg-float v4, p2, v7

    if-gtz v4, :cond_1

    .line 324
    :cond_0
    const-string v4, "TFPanel"

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "Invalid panel size , width:"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p1}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, " height:"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v4, v5}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    .line 326
    :cond_1
    iput p1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mWidth:F

    .line 327
    iput p2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHeight:F

    .line 329
    div-float v1, p1, v8

    .line 330
    .local v1, halfWidth:F
    div-float v0, p2, v8

    .line 331
    .local v0, halfHeight:F
    const/16 v4, 0x18

    new-array v3, v4, [F

    neg-float v4, v1

    aput v4, v3, v9

    const/4 v4, 0x1

    neg-float v5, v0

    aput v5, v3, v4

    const/4 v4, 0x2

    aput v7, v3, v4

    const/4 v4, 0x3

    aput v1, v3, v4

    const/4 v4, 0x4

    neg-float v5, v0

    aput v5, v3, v4

    const/4 v4, 0x5

    aput v7, v3, v4

    const/4 v4, 0x6

    neg-float v5, v1

    aput v5, v3, v4

    const/4 v4, 0x7

    aput v0, v3, v4

    const/16 v4, 0x8

    aput v7, v3, v4

    const/16 v4, 0x9

    aput v1, v3, v4

    const/16 v4, 0xa

    aput v0, v3, v4

    const/16 v4, 0xb

    aput v7, v3, v4

    const/16 v4, 0xc

    neg-float v5, v1

    aput v5, v3, v4

    const/16 v4, 0xd

    neg-float v5, v0

    aput v5, v3, v4

    const/16 v4, 0xe

    aput v7, v3, v4

    const/16 v4, 0xf

    aput v1, v3, v4

    const/16 v4, 0x10

    neg-float v5, v0

    aput v5, v3, v4

    const/16 v4, 0x11

    aput v7, v3, v4

    const/16 v4, 0x12

    neg-float v5, v1

    aput v5, v3, v4

    const/16 v4, 0x13

    aput v0, v3, v4

    const/16 v4, 0x14

    aput v7, v3, v4

    const/16 v4, 0x15

    aput v1, v3, v4

    const/16 v4, 0x16

    aput v0, v3, v4

    const/16 v4, 0x17

    aput v7, v3, v4

    .line 346
    .local v3, vertices:[F
    array-length v4, v3

    mul-int/lit8 v4, v4, 0x4

    invoke-static {v4}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;

    move-result-object v2

    .line 347
    .local v2, vbb:Ljava/nio/ByteBuffer;
    invoke-static {}, Ljava/nio/ByteOrder;->nativeOrder()Ljava/nio/ByteOrder;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;

    .line 348
    invoke-virtual {v2}, Ljava/nio/ByteBuffer;->asFloatBuffer()Ljava/nio/FloatBuffer;

    move-result-object v4

    iput-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mVertexBuffer:Ljava/nio/FloatBuffer;

    .line 349
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mVertexBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v4, v3}, Ljava/nio/FloatBuffer;->put([F)Ljava/nio/FloatBuffer;

    .line 350
    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFModel;->mVertexBuffer:Ljava/nio/FloatBuffer;

    invoke-virtual {v4, v9}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;

    .line 353
    iput p1, p0, Lcom/nemustech/tiffany/world/TFModel;->mWidth:F

    .line 354
    iput p2, p0, Lcom/nemustech/tiffany/world/TFModel;->mHeight:F

    .line 355
    iput v7, p0, Lcom/nemustech/tiffany/world/TFModel;->mDepth:F

    .line 357
    return-void
.end method

.method updateHitPoint()V
    .locals 13

    .prologue
    .line 387
    invoke-super {p0}, Lcom/nemustech/tiffany/world/TFModel;->updateHitPoint()V

    .line 389
    iget-object v0, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHitPoint:[F

    .line 390
    .local v0, m:[F
    const/4 v1, 0x0

    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHitTestLine:[F

    const/4 v3, 0x0

    iget-object v4, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHitTestLine:[F

    const/4 v5, 0x4

    const/4 v6, 0x0

    const/4 v7, 0x2

    invoke-static/range {v0 .. v7}, Lcom/nemustech/tiffany/world/TFVector3D;->getPointOnLine([FI[FI[FIFI)F

    .line 393
    iget v1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mWidth:F

    const/high16 v2, 0x4000

    div-float v8, v1, v2

    .line 394
    .local v8, A:F
    iget v1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHeight:F

    const/high16 v2, 0x4000

    div-float v9, v1, v2

    .line 395
    .local v9, B:F
    const/4 v1, 0x0

    aget v11, v0, v1

    .line 396
    .local v11, x:F
    const/4 v1, 0x1

    aget v12, v0, v1

    .line 398
    .local v12, y:F
    neg-float v1, v8

    cmpg-float v1, v11, v1

    if-ltz v1, :cond_0

    cmpl-float v1, v11, v8

    if-gtz v1, :cond_0

    neg-float v1, v9

    cmpg-float v1, v12, v1

    if-ltz v1, :cond_0

    cmpl-float v1, v12, v9

    if-lez v1, :cond_1

    .line 408
    :cond_0
    :goto_0
    return-void

    .line 400
    :cond_1
    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/nemustech/tiffany/world/TFVector3D;->setW([FI)V

    .line 401
    const/4 v1, 0x4

    iget-object v2, p0, Lcom/nemustech/tiffany/world/TFPanel;->mMatrix:[F

    const/4 v3, 0x0

    const/4 v5, 0x0

    move-object v4, v0

    invoke-static/range {v0 .. v5}, Landroid/opengl/Matrix;->multiplyMV([FI[FI[FI)V

    .line 403
    iget-object v1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHitTestLine:[F

    const/4 v2, 0x0

    iget-object v3, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHitTestLine:[F

    const/4 v4, 0x4

    const/4 v5, 0x2

    invoke-static {v1, v2, v3, v4, v5}, Lcom/nemustech/tiffany/world/TFVector3D;->dotWithAxis([FI[FII)F

    move-result v10

    .line 405
    .local v10, dot:F
    const/4 v1, 0x0

    iput v1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHitFace:I

    .line 406
    const/4 v1, 0x0

    cmpl-float v1, v10, v1

    if-lez v1, :cond_0

    .line 407
    const/4 v1, 0x1

    iput v1, p0, Lcom/nemustech/tiffany/world/TFPanel;->mHitFace:I

    goto :goto_0
.end method
